home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Applications / Python 1.3 / source code / Modules / Makefile.pre.in < prev    next >
Encoding:
Makefile  |  1995-12-17  |  4.2 KB  |  174 lines  |  [TEXT/R*ch]

  1. # META-NOTE: this note is different from the note in the other Makefiles!
  2. # NOTE: Makefile.pre.in is converted into Makefile.pre by the configure
  3. # script in the toplevel directory or by ../config.status.
  4. # Makefile.pre is converted into Makefile by running the makesetup
  5. # script in the source directory.  Once Makefile exists, it can be
  6. # brought up to date by running "make Makefile".  (The makesetup also
  7. # creates config.c from config.c.in in the source directory.)
  8.  
  9. # === Variables set by makesetup ===
  10.  
  11. MODOBJS=    _MODOBJS_
  12. MODLIBS=    _MODLIBS_
  13.  
  14. # === Variables set by configure ===
  15.  
  16. srcdir=        @srcdir@
  17. VPATH=        @srcdir@
  18.  
  19. CC=        @CC@
  20. RANLIB=        @RANLIB@
  21. AR=        @AR@
  22.  
  23. OPT=        @OPT@
  24.  
  25. DEFS=        @DEFS@
  26. LIBS=        @LIBS@
  27. LIBM=        @LIBM@
  28. LIBC=        @LIBC@
  29.  
  30. # Machine-dependent subdirectories
  31. MACHDEP=    @MACHDEP@
  32.  
  33. # Install prefix for architecture-independent files
  34. prefix=        @prefix@
  35.  
  36. # Install prefix for architecture-dependent files
  37. exec_prefix=    @exec_prefix@
  38.  
  39. # Symbols used for using shared libraries
  40. SO=        @SO@
  41. LDSHARED=    @LDSHARED@
  42. CCSHARED=    @CCSHARED@
  43. LINKFORSHARED=    @LINKFORSHARED@
  44. DESTSHARED=    $(exec_prefix)/lib/python/$(MACHDEP)
  45.  
  46. # === Variables that are customizable by hand or by inclusion in Setup ===
  47.  
  48. LINKCC=        $(CC)
  49. INCLDIR=    $(srcdir)/../Include
  50. CFLAGS=        $(OPT) -I$(INCLDIR) -I.. $(DEFS)
  51.  
  52. MKDEP=        mkdep
  53. SHELL=        /bin/sh
  54.  
  55. MAKESETUP=    $(srcdir)/makesetup
  56.  
  57. # (The makesetup script inserts all variable definitions found
  58. # found in the Setup file just below the following line.
  59. # This means that the Setup file can override any of the definitions
  60. # given before this point, but not any given below.
  61. # The script insert the definitions in reverse order,
  62. # for the benefits of independent extensions.)
  63. # === Definitions added by makesetup ===
  64.  
  65. # === Fixed definitions ===
  66.  
  67. OBJS=        $(MODOBJS)
  68.  
  69. ADDOBJS=    main.o config.o getpath.o
  70.  
  71. LIB=        libModules.a
  72.  
  73. MYLIBS=        $(LIB) \
  74.         ../Python/libPython.a \
  75.         ../Objects/libObjects.a \
  76.         ../Parser/libParser.a
  77.  
  78. SYSLIBS=    $(LIBM) $(LIBC)
  79.  
  80.  
  81. # === Rules ===
  82.  
  83. all:        $(LIB) ../python sharedmods
  84.  
  85. $(LIB):        $& $(OBJS) Makefile
  86.         -rm -f $(LIB)
  87.         $(AR) cr $(LIB) $(OBJS)
  88.         $(RANLIB) $(LIB)
  89.  
  90. ../python:    $(MYLIBS) $(ADDOBJS) Makefile
  91.         $(LINKCC) $(OPT) $(LINKFORSHARED) $(ADDOBJS) \
  92.               $(MYLIBS) $(MODLIBS) $(LIBS) $(SYSLIBS) -o python
  93.         mv python ../python
  94.  
  95. clean:
  96.         -rm -f *.o python core *~ [@,#]* *.old *.orig *.rej
  97.  
  98. clobber:    clean
  99.         -rm -f *.a tags TAGS config.c glmodule.c Makefile.pre
  100.         -rm -f *.so so_locations
  101.  
  102. getpath.o:    getpath.c Makefile
  103.         $(CC) -c $(CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \
  104.               $(srcdir)/getpath.c
  105.  
  106. config.c Makefile: Makefile.pre config.c.in $(MAKESETUP) Setup
  107.         $(SHELL) $(MAKESETUP) Setup
  108.  
  109. Setup:
  110.         cp $(srcdir)/Setup.in Setup
  111.  
  112. Makefile.pre:    Makefile.pre.in ../config.status
  113.         (cd ..; CONFIG_FILES=Modules/Makefile.pre CONFIG_HEADERS= \
  114.         $(SHELL) config.status)
  115.  
  116. depend:
  117.         $(MKDEP) $(CFLAGS) `echo $(OBJS) | tr ' ' '\012' | \
  118.                     sed 's|\(.*\)\.o|$(srcdir)/\1.c|'`
  119.  
  120. .PRECIOUS:    ../python
  121.  
  122. glmodule.c:    $(srcdir)/cgen.py $(srcdir)/cstubs
  123.         python $(srcdir)/cgen.py <$(srcdir)/cstubs >glmodule.c
  124.  
  125. almodule.o: almodule.c
  126. arraymodule.o: arraymodule.c
  127. audioop.o: audioop.c
  128. cdmodule.o: cdmodule.c
  129. clmodule.o: clmodule.c
  130. dbmmodule.o: dbmmodule.c
  131. fcntlmodule.o: fcntlmodule.c
  132. flmodule.o: flmodule.c
  133. fmmodule.o: fmmodule.c
  134. glmodule.o: glmodule.c
  135. imageop.o: imageop.c
  136. imgfile.o: imgfile.c
  137. main.o: main.c
  138. mathmodule.o: mathmodule.c
  139. md5c.o: md5c.c
  140. md5module.o: md5module.c
  141. mpzmodule.o: mpzmodule.c
  142. nismodule.o: nismodule.c
  143. parsermodule.o: parsermodule.c
  144. posixmodule.o: posixmodule.c
  145. pwdmodule.o: pwdmodule.c
  146. regexmodule.o: regexmodule.c
  147. regexpr.o: regexpr.c
  148. rgbimgmodule.o: rgbimgmodule.c
  149. rotormodule.o: rotormodule.c
  150. selectmodule.o: selectmodule.c
  151. sgimodule.o: sgimodule.c
  152. socketmodule.o: socketmodule.c
  153. stdwinmodule.o: stdwinmodule.c
  154. stropmodule.o: stropmodule.c
  155. structmodule.o: structmodule.c
  156. sunaudiodev.o: sunaudiodev.c
  157. svmodule.o: svmodule.c
  158. threadmodule.o: threadmodule.c
  159. timemodule.o: timemodule.c
  160. timingmodule.o: timingmodule.c
  161. xxmodule.o: xxmodule.c
  162. yuvconvert.o: yuvconvert.c
  163.  
  164. # Rules to build and install all shared modules
  165. sharedmods:    $(SHAREDMODS)
  166. sharedinstall:    $(DESTSHARED) $(SHAREDMODS)
  167.         -for i in dummy $(SHAREDMODS); do \
  168.             if test -f $$i; then mv $$i $(DESTSHARED)/$$i; fi; done
  169.  
  170. $(DESTSHARED):
  171.         mkdir $(DESTSHARED)
  172.  
  173. # Stuff is appended here by makesetup and make depend
  174.